import { EntityProps, MappingProps } from "src/utils/interface";

interface Data {
  entity: EntityProps;
  mapping: MappingProps;
}

export const data: Data[] = [];
for (let i = 0; i < 20; i++) {
  const entity: EntityProps = {
    entityName: `entity-${i}`,
    description: `entity-${i}`,
    owners: ["chenweidong", "fengmian"],
    fields: [
      {
        name: "0",
        type: "object",
        description: "",
        codec: "",
        itemType: "",
        innerFields: [
          {
            name: "int",
            type: "int32",
            description: "",
            codec: "",
          },
        ],
      },
    ],
    indexs: [{ fieldGroup: ["0"], primary: true, unique: true }],
  };

  const mapping = {
    entityName: `entity-${i}`,
    storageUri: "toutiao-mysql-chenweidong",
    tableName: "cwd",
    idcs: ["cn"],
    columns: [
      {
        columnName: "0",
        fieldName: "0",
        columnType: "INT",
      },
    ],
  };
  data.push({ entity, mapping });
}
